<%-- 
    Document   : editworkProject
    Created on : Jul 28, 2012, 10:42:22 AM
    Author     : VANANH
--%>


<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="../css/kapiform.css"/> 
    </head>

    <style type="text/css">
        #ui-datepicker-div
        {
            z-index: 9999999;
        }
        html{visible : true}


    </style>
    <script type="text/javascript">
        var open_cur = 0;
        $j = jQuery.noConflict();
        $j(document).ready(function(){    
            $j('.checkperdd').live('click',function(){
                // alert(grouptour);
                if(grouptour==null){
                    alert("Bạn chưa chọn nhóm cho người đại diện!");
                    
                }else{
                    lang= $j(this).attr("lang");
                    vn062 = 0;
                    if( $j(this).is(":checked"))
                    {
                        vn062 = 1;
                    }else               {
                        vn062 = 0;
                    }   
               
                    $j.post("addpersonalDD.jsp?"+lang+"&vn062="+vn062+"&vv061="+grouptour,function(data){
                            
                    });    
                }
                
            });
            var grouptour =null;
            $j('.gourptour').live('change',function(){
                grouptour = $j(this).val();
                if(grouptour!=null){
                    $j(this).parent().parent().prev().prev().children().children().css("display","block");
                }
                // alert(grouptour);
            });
            $j('.butttonper').live('click',function(){
                window.location="customer4tour.jsp";
            });
        });
    </script>
    <style>
        .checkperdd{
            display: none;
        }
    </style>
    <f:view>
        <a4j:form id="form-input-customer" >
            <body style=" float:left; width:auto; height:auto; margin:0px;">
                <f:loadBundle basename="#{environmentSession.localizationSource}" var="locale"/>
                <div class="popup" style="height:500px; width:630px">
                    <div class="popup-header">
                        <div class="title"><h:outputText value="DANH SÁCH KHÁCH HÀNG THEO TOUR"/></div>
                    </div>
                    <div class="popup-content">
                        <div class="main_content">
                            <div class="form_item_content" style="margin-top:0px; margin-left: 0px;margin-bottom: 0px;" >
                                <div class="item_content" style="overflow: auto;height: 410px;">
                                    <rich:dataTable  value="#{v030Controller.list}" rowKeyVar="row" var="item" columnClasses="col1"
                                                     rowClasses="blue, white"
                                                     >
                                        <rich:column> 
                                            <f:facet name="header">
                                                <h:outputText value="STT"/>
                                            </f:facet>
                                            <div style="width: 100%;text-align: center">
                                                <h:outputText value="#{row+1} "/>
                                            </div>
                                        </rich:column>
                                        <rich:column> 
                                            <f:facet name="header">
                                                <h:outputText value="Choose"/>
                                            </f:facet>
                                            <div style="width: 100%;text-align: center;">
                                                <h:panelGroup rendered="#{item.vn062!=0}">  <h:selectBooleanCheckbox disabled="true" value="#{item.checkngt4tour}" lang="action=checkpersonalDD&pn100=#{item.pn100}&fv050=#{v030Controller.FV050}"/></h:panelGroup>
                                                <h:panelGroup rendered="#{item.vn062==0}">  <h:selectBooleanCheckbox styleClass="checkperdd" value="#{item.checkngt4tour}" lang="action=checkpersonalDD&pn100=#{item.pn100}&fv050=#{v030Controller.FV050}"/></h:panelGroup>
                                            </div>
                                        </rich:column>
                                        <rich:column> 
                                            <f:facet name="header">
                                                <h:outputText value="Họ tên"/>
                                            </f:facet>
                                            <div style="text-align: left;">
                                                <h:outputText value="#{item.hoten}"/>
                                            </div>
                                        </rich:column>
                                        <rich:column> 
                                            <f:facet name="header">
                                                <h:outputText value="Nhóm"/>
                                            </f:facet>
                                            <div style="text-align: center;">
                                                <h:selectOneMenu styleClass="gourptour" value="#{item.vv061}">
                                                    <f:selectItem itemValue="X" itemLabel="------------"/>
                                                    <f:selectItem itemValue="A" itemLabel="A"/>
                                                    <f:selectItem itemValue="B" itemLabel="B"/>
                                                    <f:selectItem itemValue="C" itemLabel="C"/>
                                                    <f:selectItem itemValue="D" itemLabel="D"/>
                                                    <f:selectItem itemValue="E" itemLabel="E"/>
                                                    <f:selectItem itemValue="F" itemLabel="F"/>
                                                    <f:selectItem itemValue="G" itemLabel="G"/>
                                                </h:selectOneMenu>
                                            </div>
                                        </rich:column> 
                                    </rich:dataTable>
                                </div>
                            </div>
                            <div class="popup-footer">      
                                <div class="buttonsave butttonper" style="margin-right:10px;"  ><span><h:outputText value="#{locale.button_close}"/></span></div>


                            </div>

                        </div>    
                    </div>
                </div>
            </body>
        </a4j:form>
    </f:view>
</html>
<script type="text/javascript">
    $j(document).ready(function(){
        yhight = ($j('.popup').height()-90)+"px" ;
        $j('.main_content').css('height',yhight );
        $j('.popup-content').css('height',yhight );
    });
</script>

